cmake_minimum_required(VERSION 3.18)

project(ir_gen)

find_package(LLVM 14 REQUIRED CONFIG)
find_package(Clang REQUIRED CONFIG HINTS "/usr/lib/llvm-14/lib/cmake/clang")

message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")

include_directories(${LLVM_INCLUDE_DIRS})
include_directories(${CLANG_INCLUDE_DIRS})

add_executable(ir_gen ir_gen.cpp)

target_link_libraries (ir_gen clangDaemon clangFrontendTool)

